//
//  EnumViewController.swift
//  SwiftTest
//
//  Created by midea on 16/3/14.
//  Copyright © 2016年 Vincent. All rights reserved.
//

import Foundation
import UIKit

private enum CompassPoint {
    case east,eastSouth
    case south
    case west
    case north
}

private enum barCode {
    case upca(Int,Int,Int)
    case qRcode(String)
}

private var point1 = CompassPoint.eastSouth
private var point2 : CompassPoint = .east

class EnumViewController : BaseViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.titles = ["statement"]
        self.tableView?.reloadData()
    }
    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        super.tableView(tableView, didSelectRowAt: indexPath)
        
        switch indexPath.row{
        case 0:
            statement()
        default:
            print("no more methods")
        }
    }
    
    fileprivate func statement(){
        switch point1 {
        case .east, .eastSouth:
            print("direction east")
        case .south:
            print("direction south")
        case .west:
            print("direction west")
        case .north:
            print("direction north")
        }
        
        let barCode1 = barCode.qRcode("hello")
        print(barCode1)
    }
}

